package com.gscitysfy.cus.drain.modules.inspection.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gscitysfy.cloudfrmwk.assistant.domain.Result;
import com.gscitysfy.cus.drain.modules.inspection.entity.DrainInspectionMnPlan;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gscitysfy.cus.drain.modules.inspection.vo.PlanVo;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author Administrator
 * @since 2022-10-14 15:00:46
 */
public interface IDrainInspectionMnPlanService extends IService<DrainInspectionMnPlan> {

    /**
     *  新增或者修改巡检计划
     * @param plan
     * @return
     */
    Result<Boolean> addOrUpdate(DrainInspectionMnPlan plan);

    /**
     * 删除巡检计划，逻辑删除
     * @param ids
     * @return
     */
    Result<Boolean> remove(String ids);

    /**
     * 获取巡检计划列表
     * @param page
     * @param plan
     * @return
     */
    Result<Object> getPlanList(Page<DrainInspectionMnPlan> page, PlanVo plan);

    /**
     * 审核计划
     * @param plan
     * @return
     */
    Result<Boolean> audit(PlanVo plan);

    /**
     *  导出巡检计划
     * @param response
     * @param plan
     * @throws IOException
     */
    void export(HttpServletResponse response, PlanVo plan) throws IOException;

    /**
     * 生成巡检任务
     */
    void createJob();

    /**
     * 计划详情
     * @param id
     * @return
     */
    Result<DrainInspectionMnPlan> viewById(Long id);


    /**
     * 创建巡养任务
     */
    void createOrder();
}
